{{ $category := index $.Site.Data.doc_categories (.Scratch.Get "category_id") }}

<h3 class='{{ $category.category_id }}'>{{ $category.name }}</h3>
<ul class='unstyled'>
  {{ range $doc := $category.commands }}
  <li>
    {{ if (eq $doc.doc "credential-helpers") }}
      <a href="{{ relURL "doc/credential-helpers" }}">
    {{ else }}
      <a href="{{ relURL (print "docs/" $doc.doc (cond (and (ne $.Page.Params.lang nil) (ne $doc.no_append_lang true) (isset (index $.Site.Data.docs.pages $doc.doc) "languages") (isset (index $.Site.Data.docs.pages $doc.doc "languages") $.Page.Params.lang)) (print "/" $.Page.Params.lang) "")) }}">
    {{ end }}
      {{ if (eq $doc.title nil) }}
        {{ replace $doc.doc "git-" "" }}
      {{ else }}
        {{ $doc.title }}
      {{ end }}
    </a>
  </li>
  {{ end }}
</ul>
